<?php
if ( !defined( 'BASEPATH' ) ) exit( 'No direct script access allowed' );
echo $header;
?>
<!-- main -->
<div class="main">
<?php if(isset($message) && $message){ ?>
    <?php echo $message; ?>
<?php }else{ ?>
    <ul class="tab">
        <li><a href="<?php my_url('setting', 'email'); ?>"<?php if($type == 'email'){ ?> class="active"<?php } ?>>邮箱</a></li>
        <li><a href="<?php my_url('setting', 'password'); ?>"<?php if($type == 'password'){ ?> class="active"<?php } ?>>修改密码</a></li>
    </ul>
    <div class="c"></div>
    <div class="setting">
    <h3>设置邮箱</h3>
    <div class="tipbox">
        <?php echo validation_errors(); ?>
    </div>
    <?php echo form_open( base_url( 'setting/editemail' ) ); ?>
    <ul class="common_form">
        <li>
            <label for="email">邮箱</label>
            <?php echo form_input( array( 'id' => 'email', 'name' => 'email', 'class' => 'txtbox' ), ( set_value( 'email' ) ) ? set_value( 'email' ) : $userData['email'] ); ?>
            <?php echo form_submit( array( 'id' => 'submit', 'name' => 'submit' ), '修改' ); ?>
        </li>
    </ul>
    <?php echo create_token(); ?>
    <?php echo form_close(); ?>
    </div>
<?php } ?>
</div>
<!-- main -->
<?php echo $footer; ?>